Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Sep 23, 2024

In a sample code, when I pass a value type by reference, if the method assigns the parameter to refer to a different object, those changes are visible from the caller.

Summary

Describe your changes here.

Fixes #Issue_Number (if available)


Internal previews

📄 File 🔗 Preview link
docs/csharp/language-reference/keywords/method-parameters.md docs/csharp/language-reference/keywords/method-parameters

In a sample code, when I pass a value type by reference, if the method assigns the parameter to refer to a different object, those changes are visible from the caller.
@ghost ghost requested review from a team and BillWagner as code owners September 23, 2024 17:09
@dotnet-bot dotnet-bot added this to the September 2024 milestone Sep 23, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates PR is created by someone from the .NET community. label Sep 23, 2024
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent is often misunderstood on this article. How about this change?

@BillWagner BillWagner enabled auto-merge (squash) October 7, 2024 15:14
@BillWagner BillWagner merged commit 18299b4 into dotnet:main Oct 7, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community. dotnet-csharp/svc lang-reference/subsvc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants